from random import randint

def generate_lottery():
    red_ball=[x for x in range(1,34)]
    lottery = [0]*6
    for n in range(6):
        index = randint(0,len(red_ball)-1)
        lottery[n]=red_ball[index]
        del red_ball[index]
    lottery.sort()
    blue_ball=randint(1,16)
    lottery.append(blue_ball)
    return lottery

def display(lottery_list):
    for i,val in enumerate(lottery_list):
        if i==len(lottery_list)-1:
            print(end=" - ")
        print("%02d"%val,end=" ")

    print()

def buy_lottery(n):
    for _ in range(n):
       display(generate_lottery())


if __name__=='__main__':
    n =int(input("你需要购买几注："))
    buy_lottery(n)
